<?php
session_start();
if(empty($_SESSION['email'])){
    echo "<script>location.href='/index.php?s=index/login/index'</script>";
    exit();
}
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>分数列表</title>
		<link href="admin/css/backstage.css" rel="stylesheet"  type="text/css"/>
	</head>
	<body>
		<div id="q-container">
			<div id="q-top">    
			        <h2>调查问卷系统</h2>
                <h4>欢迎你：<?php echo $_SESSION['name']?> <a href="/index/index/edit/user_email/<?php echo $_SESSION['email']?>">编辑</a> <a href="/index/login/loginOut">退出</a></h4>
			</div>
			<div id="link">
                <ul>
                    <li><a href="/index.php?s=admin/questionnaire/index">问卷列表</a></li>
                    <li><a href="/index.php?s=admin/score/index">分数列表</a></li>
                    <li><a href="/index.php?s=admin/users/index">用户列表</a></li>
                    <li><a href="/index.php?s=admin/admin/adminList">管理员</a></li>
                </ul>
			</div>
			<div id="q-content">
				<table class="list">
					<tbody>
						<tr>
<!--							<th></th>-->
							<th>ID</th>
							<th>用户名</th>
							<th>邮箱</th>
							<th>添加时间</th>
							<th>操作</th>
						</tr>
                        <?php foreach ($usersList as $value):?>
						<tr>
<!--							<td><input type="checkbox" class="task-checkbox" name="TaskId[]" value=""></td>-->
							<td><?php echo $value['user_id']?></td>
							<td><?php echo $value['user_name']?></td>
							<td><?php echo $value['user_email']?></td>
							<td><?php echo date('Y-m-d H:i:s',$value['add_time'])?></td>
							<td>
                                <a class="update_ing" href="/index.php?s=admin/users/edit/user_id/<?php echo $value['user_id']?>">编辑</a>
                                <a class="update_ing" href="/index.php?s=admin/users/delete/user_id/<?php echo $value['user_id']?>">删除</a>
							</td>
						</tr>
						<?php endforeach;?>
					</tbody>
				</table>
			</div>
		</div>
	</body>
</html>
